package com.houweishi.module.purchase.mapper;

import java.util.List;

import com.houweishi.module.leave.domain.OaLeave;
import com.houweishi.module.leave.domain.OaLeaveApproval;
import com.houweishi.module.purchase.domain.OaPurchase;
import com.houweishi.module.purchase.domain.OaPurchaseApproval;

/**
 * 采购申请Mapper接口
 * 
 * @author houweishi
 * @date 2023-03-27
 */
public interface OaPurchaseMapper 
{
    /**
     * 查询采购申请
     * 
     * @param id 采购申请主键
     * @return 采购申请
     */
    public OaPurchase selectOaPurchaseById(Long id);

    /**
     * 查询采购申请列表
     * 
     * @param oaPurchase 采购申请
     * @return 采购申请集合
     */
    public List<OaPurchase> selectOaPurchaseList(OaPurchase oaPurchase);

    /**
     * 新增采购申请
     * 
     * @param oaPurchase 采购申请
     * @return 结果
     */
    public int insertOaPurchase(OaPurchase oaPurchase);

    /**
     * 修改采购申请
     * 
     * @param oaPurchase 采购申请
     * @return 结果
     */
    public int updateOaPurchase(OaPurchase oaPurchase);

    /**
     * 删除插入的审批信息记录
     *
     * @param oaPurchase 请假管理
     * @return 结果
     */
    public int deleteBizApprovalRecord(OaPurchase oaPurchase);

    /**
     * 删除插入的采购申请产品
     *
     * @param oaPurchase 请假管理
     * @return 结果
     */
    public int deleteOaPurchaseProduct(OaPurchase oaPurchase);

    /**
     * 删除采购申请
     * 
     * @param id 采购申请主键
     * @return 结果
     */
    public int deleteOaPurchaseById(Long id);

    /**
     * 批量删除采购申请
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOaPurchaseByIds(Long[] ids);

    /**
     * 查询请假管理列表 (含业务表状态)
     * @param oaPurchase
     * @return
     */
    List<OaPurchaseApproval> selectOaPurchaseApprovalList(OaPurchaseApproval oaPurchase);
}
